import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from '@/store'
import typeNav from '@/components/typeNav'
import Carousel from '@/components/Carousel'
import Pagination from '@/components/Pagination'
import *as API from '@/api';
Vue.prototype.$API=API;
//("名字",需注册的组件名字)
Vue.component('typeNav',typeNav);
Vue.component('Carousel',Carousel);
Vue.component('Pagination',Pagination);
import '@/mock/mock'
import 'swiper/css/swiper.css'
// import {reqCategoryList} from '@/api'
// reqCategoryList();
//弹窗提示组件
// import Tip from '@/components/Tip'
// Vue.use('Tip',Tip)
// -----------------------------------------
//使用懒加载并配置默认方法
import autoPic from '@/assets/images/icons.png'
Vue.use(VueLazyload,{
  loading:autoPic
})




//-------------------------------------------
// 引入elementUI
import 'element-ui/lib/theme-chalk/index.css';
import { Button, MessageBox } from 'element-ui'
import VueLazyload from 'vue-lazyload'
Vue.component(Button.name, Button);
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
new Vue({
  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus=this;
  },
  router,
  store
}).$mount('#app')
